﻿using Abp.AutoMapper;
using KDS.Mes.Mes.AlcCodes.Dtos;

namespace KDS.Mes.Web.Models.AlcCodes
{
    /// <summary>
    /// 新建或编辑ALCCode信息时使用的Viewmodel
    /// </summary>
    [AutoMap(typeof(GetAlcCodeForEditOutput))]
    public class CreateOrEditAlcCodeModalViewModel : GetAlcCodeForEditOutput
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="output"></param>
        public CreateOrEditAlcCodeModalViewModel(GetAlcCodeForEditOutput output)
        {
            output.MapTo(this);
        }

        /// <summary>
        /// 是否处于编辑状态
        /// </summary>
        public bool IsEditMode { get { return AlcCode.Id.HasValue; } }

        /// <summary>
        /// 模糊查询字段
        /// </summary>
        public string FilterText { get; set; }
    }
}